import request from '@/utils/request'
const apix = 'dev-api'
// api地址
const api = {

	enroll_listOfUser: apix + '/apm/enroll/listOfUser',
	participation_listOfUser: apix + '/apm/participation/listOfUser',
	activity_list: apix + '/apm/activity/list',
	activity_export: apix + '/apm/activity/export',
	apm_activity: apix + '/apm/activity/',
	// apm_activity: apix + '/apm/activity',
	apm_activityIds: apix + '/apm/activity/',
	apm_activity_listOfNew: apix + '/apm/activity/listOfNew',
	apm_activity_listOfCreateSelf: apix + '/apm/activity/listOfCreateSelf'
}
//个人主页活动列表
export function listOfNew(page) {
	return request.get(api.apm_activity_listOfNew, {
		...page
	})
}
//新活动列表
export function listOfCreateSelf(page) {
	return request.get(api.apm_activity_listOfCreateSelf, {
		...page
	})
}
//查询当前用户报名的活动数量
export function enrollListOfUser(page) {
	return request.get(api.enroll_listOfUser, {
		...page
	})
}
//获取我参与的活动
export function activityListOfUser(page) {
	return request.get(api.participation_listOfUser, {
		...page
	})
}
//查询人才活动
export function activityList(page) {
	return request.get(api.activity_list, {
		...page
	}, {
		isPrompt: false
	})
}
//导出人才活动
export function activityExport(obj) {
	return request.post(api.activity_export, {
		...obj
	})
}
//获取人才活动活动与信息
export function activityId(id) {
	return request.get(api.apm_activity + id)
}
//新增活动
export function addActivity(obj) {
	return request.post(api.apm_activity, {
		...obj
	})
}
//修改活动
export function putActivity(obj) {
	return request.put(api.apm_activity, {
		...obj
	})
}
//删除活动
export function delActivity(id) {
	return request.delete(api.apm_activity + id)
}